﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;

namespace Devonline.Identity.Admin.Controllers;

/// <summary>
/// 身份资源管理
/// </summary>
/// <returns></returns>
[Route("api/[controller]")]
[ApiController]
[SecurityHeaders]
[Authorize(Roles = GROUP_MAINTAINERS)]
public class IdentityResourcesController : ControllerBase
{
    private readonly AdminSetting _appSetting;
    private readonly IdentityDbContext _dbContext;
    private readonly UserManager<User> _userManager;
    private readonly SignInManager<User> _signInManager;
    private readonly ILogger<IdentityResourcesController> _logger;

    public IdentityResourcesController(
        AdminSetting appSetting,
        IdentityDbContext dbContext,
        UserManager<User> userManager,
        SignInManager<User> signInManager,
        ILogger<IdentityResourcesController> logger)
    {
        _appSetting = appSetting;
        _dbContext = dbContext;
        _userManager = userManager;
        _signInManager = signInManager;
        _logger = logger;
    }
}